<template>
	<view class="page">
		<view class="header">
			<yzh-header :title="'评价管理'" :bgColor="'#E3E6F5'"></yzh-header>
			<!-- #ifdef MP-WEIXIN -->
			<image src="@/static/yzh/cxk.jpg"></image>
			<!-- #endif -->
		</view>
		<view class="body">
			<uni-card padding="10px 0" class="card" v-for="(item,index) in order" :key="index">
				<template v-slot:title>
					<view class="cardTitle">
						<text>{{item.username}}</text>
						<u-button type="primary" shape="circle" @click="toDetail(item.id)">查看详情</u-button>
					</view>
				</template>
				<view class="content">
					<view>订单编号:{{item.id}}</view>
					<view>
						<text>综合评价:{{item.score}}分</text>
						<view>
							<uni-rate :readonly="true" :value="item.score" size="14" max="3" />
						</view>
					</view>
					<view>评价时间:{{item.time}}</view>
				</view>
			</uni-card>
		</view>
	</view>
</template>

<script>
	import Header from "@/components/Header/Header.vue";
	export default {
		components: {
			'yzh-header': Header
		},
		data() {
			return {
				order: [{
					username: "张女士",
					id: 20210303837923,
					score: 1,
					time: "2023-03-12 11:02"
				}, {
					username: "张女士",
					id: 20210303837923,
					score: 1,
					time: "2023-03-12 11:02"
				}]
			}
		},
		methods: {
			toDetail(id) {
				uni.navigateTo({
					url: "/pages/yzh/Comment/CommentDetail?id=" + id
				})
			}

		}
	}
</script>

<style scoped>
	.page {
		/* #ifndef MP-WEIXIN */
		background-image: url('@/static/yzh/cxk.jpg');
		background-size: cover;
		background-position: contain;
		background-repeat: no-repeat;
		height: 110vh;
		/* #endif */
	}

	.header {}

	.header>image {
		width: 100%;
		height: 500rpx;
		position: absolute;
		z-index: -1;
	}

	.body {
		display: flex;
		flex-direction: column;
		justify-content: space-evenly;
		/* position: absolute; */
		/* top: 10%; */
		/* left: 5%; */
		width: 90%;
		margin: 0 auto;
		margin-top: 100rpx;
	}

	.cardTitle {
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		position: relative;
		height: 80rpx;
		border-bottom: 2rpx solid #E4D4D4;
		box-sizing: border-box;
	}

	.cardTitle>text {
		width: 30%;
		position: absolute;
		left: 0;
		bottom: 0;
		margin-bottom: 10rpx;
	}

	.cardTitle :nth-child(2) {
		width: 140rpx;
		height: 60rpx;
		position: absolute;
		position: absolute;
		right: 0;
		bottom: 0;
		font-size: 22rpx;
		margin-bottom: 10rpx;
	}

	.content>view:nth-child(1) {
		color: #2E80F9;
		margin-top: 10rpx;
	}

	.content>view:nth-child(2) {
		color: black;
		margin-top: 10rpx;
		display: flex;
		align-items: center;
	}

	.content>view:nth-child(2)>view {
		margin-left: 10rpx;
	}

	.content>view:nth-child(3) {
		margin-top: 10rpx;
	}
</style>